﻿using System;

namespace Shuba.Model
{
    [Serializable]

    public class MstStdInfo
    {
        public MstStdInfo()
        {
        }

        public MstStdInfo(string MstID, Int16 MstGrpID, string MstName, string IsActive, string EntryBy, DateTime EntryDate, string UpdateBy, DateTime UpdateDate, string MstType)
        {
            this.MstID = MstID;
            this.MstGrpID = MstGrpID;
            this.MstName = MstName;
            this.IsActive = IsActive;
            this.EntryBy = EntryBy;
            this._EntryDate = EntryDate;
            this.UpdateBy = UpdateBy;
            this._UpdateDate = UpdateDate;
            this._MstType = MstType;
        }

        public MstStdInfo(string MstID, Int16 MstGrpID, string MstName, string IsActive, string EntryBy, DateTime EntryDate, string UpdateBy, DateTime UpdateDate, string ActType, string OldID, string MstType)
        {
            this.MstID = MstID;
            this.MstGrpID = MstGrpID;
            this.MstName = MstName;
            this.IsActive = IsActive;
            this.EntryBy = EntryBy;
            this._EntryDate = EntryDate;
            this.UpdateBy = UpdateBy;
            this._UpdateDate = UpdateDate;
            this.ActType = ActType;
            this.OldID = OldID;
            this._MstType = MstType;
        }
        public string MstID { get; set; }

        private string _MstType = "";
        public string MstType
        {
            get { return _MstType; }
            set { _MstType = value; }
        }
        public string OldID { get; set; }
        public Int16 MstGrpID { get; set; }
        public string MstName { get; set; }
        public string IsActive { get; set; }
        public string EntryBy { get; set; }

        private DateTime _EntryDate = DateTime.Now;
        public DateTime EntryDate
        {
            get { return _EntryDate; }
            set { _EntryDate = value; }
        }
        public string UpdateBy { get; set; }

        private DateTime _UpdateDate = DateTime.Now;
        public DateTime UpdateDate
        {
            get { return _UpdateDate; }
            set { _UpdateDate = value; }
        }
        public string ActType { get; set; }

        public override string ToString()
        {
            return MstID  + " - " + MstGrpID.ToString() + " - " + MstName + " - " + IsActive + " - " +
                EntryBy + " - " + _EntryDate.ToString("yyyy MMM dd hh:mm:ss") + " - " + 
                UpdateBy + " - " + _UpdateDate.ToString("yyyy MMM dd hh:mm:ss");
        }

        public string ToString4Audit()
        {
            return "NAME: " + MstName + ", IS_ACTIVE: " + IsActive + ", GROUP ID: " + MstGrpID.ToString() +
                ", ENTRY_BY: " + EntryBy + ", ENTRY_DT: " + 
                _EntryDate.ToString("yyyy MMM dd hh:mm:ss") + ", UPDATE_BY: " + UpdateBy + ", UPDATE_DT: " + 
                _UpdateDate.ToString("yyyy MMM dd hh:mm:ss");
        }
    }
}
